package com.e2edour.web.spring;


import com.e2edour.runtime.properties.PropertiesConfig;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.ComponentScan;
/*import org.springframework.context.annotation.ImportResource;
import org.springframework.data.mongodb.repository.config.EnableMongoRepositories;*/

import java.util.Properties;


/**
 * <p>
 *
 * @author King
 * @since 2017/1/13
 */
@SpringBootApplication
@EnableAutoConfiguration
@ComponentScan("com.e2edour")//解决不在一包中扫描不到的问题
//@EnableMongoRepositories(basePackages = "com.e2edour.dal.repository")
//@ImportResource({"classpath:dubbo-provider-config.xml"})
public class ApplicationRun{

    public static void main(String[] args) {
        SpringApplication application = new SpringApplication(ApplicationRun.class);
        Properties properties = PropertiesConfig.loadFile();
        //加载配置文件
        application.setDefaultProperties(properties);
        application.run();
    }

}
